#! /usr/bin/env python
"""
pressure tools
Copyright (c) 2011-2013 Christian T. Steigies <steigies@physik.uni-kiel.de>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

__author__ = "Christian T. Steigies <steigies@physik.uni-kiel.de>"
__license__ = "GPL License"

## --------------------------------------------------------------------------
def mbar(p_in_torr):
    """ convert torr into mbar"""

    return (1000.*p_in_torr/750.06)

## --------------------------------------------------------------------------
def torr(p_in_mbar):
    """ convert mbar into torr"""

    return (750.06*p_in_mbar/1000.)

## --------------------------------------------------------------------------
if __name__ == "__main__":
    print "This is the pressure module."

    print torr(1000)
    print mbar(750)
